<?php
defined('SYSPATH') OR die('No direct access allowed.');
/**
 * list.php
 * @author ranuandra
 *
 * 10 Mei 2012 10:41:30
 *
 * 
 */
?>
<h1>Data Lowongan</h1>
<table class="front">
	<thead>
	<tr>
		<th>Kode</th>
		<th>Lowongan</th>
		<th>Tgl Apply</th>
		<th>Proses</th>
		<th></th>
	</tr>
	</thead>
	<tbody>
<?php 
foreach($datas as $data)
{
?>
	<tr>
		<td><a href="<?php echo URL::base()?>lowongan/detail/<?php echo $data->mstlowongan->id?>"><?php echo $data->mstlowongan->kode?></a></td>
		<td><?php echo $data->mstlowongan->deskripsi?></td>
		<td><?php echo $data->tgl_apply?></td>
		<td>
		<?php 
			if($data->pelamarproses->count_all() > 0)
			{
				$proses = $data->pelamarproses->order_by('id', 'DESC')->find_all();
				//print_r($proses);
				echo $proses[0]->proseslowongan->mstproses->proses;
			}
		?>
		</td>
		<td>
		<?php 
			if($data->pelamarproses->count_all() > 0)
			{
		?>
				<a href="<?php echo URL::base()?>lowongan/proses/<?php echo $data->id?>">Proses</a>
		<?php 
			}	
		 ?>	
		</td>
	</tr>
<?php 	
}
?>
	</tbody>
</table>